package com.llsydn.handler;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import com.llsydn.handler.async.AsyncTaskTestActivity;
import com.llsydn.handler.handler.HandlerDemoActivity;
import com.llsydn.handler.handler.HandlerTestActivity;
import com.llsydn.hello.R;

/**
 * @author lilinshen
 * @title 消息机制与异步任务
 * @description 请填写相关描述
 * @date 2018/9/27 10:20
 */
public class HandlerMainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_handler_main);
    }

    /**
     * 测试Handler的使用
     *
     * @param view
     */
    public void testHandler(View view) {
        startActivity(new Intent(this, HandlerTestActivity.class));
    }

    /**
     * Hander使用的小DEMO
     *
     * @param view
     */
    public void handlerDemo(View view) {
        startActivity(new Intent(this, HandlerDemoActivity.class));
    }

    /**
     * 测试AsyncTask的使用
     *
     * @param view
     */
    public void testAsyncTask(View view) {
        startActivity(new Intent(this, AsyncTaskTestActivity.class));
    }
}
